<!--RLHF选择最优结果-->

{% extends 'system_home/base.html' %}
{% block content %}
    {% if task.task_type == '2' %}<!--文本分类-->
        {% block text_classification %}

            <section class="shop single section">
                <div class="container">
                    <div class="row">
                        <div class="col-12">
                            <div class="row">
                                <div class="col-lg-3 mb-4 offset-1">
                                    <div class="account-sidebar">
                                    <h6 class="sidebar-title">任务信息</h6>
                                    <div class="sidebar-list md-1">
                                        <a href="#"><i class="far fa-heart"></i> 任务名称
                                            <span>{{ task.task_name }}</span></a>
                                        <a href="#" ><i class="far fa-clock"></i>
                                            截止时间
                                            <span>{{ task.task_deadline_time|date:"y年m月d日" }}</span></a>
                                        <a href="#"><i class="far fa-headset"></i> 任务描述
                                            </a><span>{{ task.task_description }}</span>
                                    </div>
                                    <h6 class="sidebar-title mt-4">任务进度</h6>
                                    <div class="sidebar-list">
                                        <a href="#"><i class="far fa-user"></i> 总数量
                                        <span>{{ all_assign_num }}</span></a>

                                        <a href="#"><i class="far fa-map-marker-alt"></i> 已标注数量
                                            <span>{{ anno_assign_num }}</span></a>
                                        <a href="#"><i class="far fa-credit-card"></i> 进度百分比
                                            <span>{{ perc_anno }}</span></a>
                                    </div>
                                </div>
                                </div>
                                <div class="col-lg-6 offset-1 ">
                                    <div class="product-des">
                                        <div class="short">
                                            <div class="account-content">
                                                <h4>{{ prompt }}</h4>
                                                <p class="mt-3">{{ data_current.taskdata_content }}</p>
                                            </div>

                                        </div>
                                        <form method="post" action="{% url 'annotating_data:submit' %}">

                                            <div class="account-content mt-4">
                                                <div class="layui-form">
                                                    {% for label in labels %}
                                                        {% csrf_token %}
                                                        <input type="radio" name="label" value="{{ label }}"
                                                               title="默认">
                                                        <div lay-radio>
                                                            <span style="color: #32b77c;font-weight: bold">{{ label }}</span>
                                                        </div>
                                                        <input type="hidden" name="task_id" value="{{ task.id }}">
                                                        <input type="hidden" name="type" value='{{ task.task_type }}'>
                                                        <input type="hidden" name="next_data_id" value="{{ next_data.taskdata_id_id }}">
                                                        <input type="hidden" name="current_data_id" value="{{ data_current.taskdata_id_id }}">
                                                    {% endfor %}

                                                </div>
                                                <div class="add-to-cart mt-4 ">
                                                    <button class="btn" type="submit">确定</button>
                                                </div>
                                            </div>
                                        </form>


                                        <div class="col-12">

                                            <div class="pagination">
                                                <ul class="pagination-list">
                                                    <li>
                                                        <a href="{% url 'annotating_data:annotate' task.id pre_data.taskdata_id_id %}"><i
                                                                class="ti-arrow-left"></i></a></li>
                                                    <li><a href="{% url 'annotating_data:index' %}">任务视图</a></li>
                                                    {#                                                    <li><a href="#">1</a></li>#}
                                                    {#                                                    <li class="active"><a href="#">2</a></li>#}
                                                    {#                                                    <li><a href="#">3</a></li>#}
                                                    <li>
                                                        <a href="{% url 'annotating_data:annotate' task.id next_data.taskdata_id_id %}"><i
                                                                class="ti-arrow-right"></i></a></li>
                                                </ul>
                                            </div>

                                        </div>


                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </section>



        {% endblock %}
        {% elif task.task_type == 1 %}<!--有监督语言模型微调，写回复Supervised Language Model Fine-tuning-->
        {% block supervised_language_model_finetuning %}
            <div>SLMF</div>{% endblock %}
        {% elif task.task_type == 2 %}<!--RLHF选择最优结果-->
        {% block RLHF %}{% endblock %}
        {% elif task.task_type == 3 %}<!--聊天机器人模型评估Chatbot Model Assessment-->
        {% block chatbot_model_assessment %}{% endblock %}
        {% elif task.task_type == 4 %}<!--图像分类-->
        {% block image_classification %}
            <div>图像分类</div>
            <image src="{{ data_current.taskdata_content }}" alt="图片" width="200px" height="200px"></image>
            <image src="\images\wallhaven-l88zep_3840x2160.png"></image>
        {% endblock %}
        {% elif task.task_type == 5 %}<!--图像框选-->
        {% block image_box %}{% endblock %}
    {% endif %}


{% endblock %}
